package com.lanou.service;

import com.lanou.entity.Commodity;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@Service
public interface CartService {
    List<Commodity> updateCart(List<Commodity> commodities, Long itemId, Integer num);

    boolean cartDelete(HttpServletRequest request, HttpServletResponse response);

    void editCart(Long itemId, Integer num, Long userId);

    List<Commodity> getCartItemList(Long userId);

    List<Commodity> establishCart(Long itemId, Integer num, Long userId);

    List<Commodity> getCheckedCart(Long userId);

    List<Commodity> amendStatus(Integer status, Long userId, Long itemId);

    void cartDeletes(Long userId);

    void cartDle(Long userId, Long itemId);

    List<Commodity> cartStatusAll(Long userId,Integer status);

    List<Commodity> loginMergeAll(Long userId, HttpServletRequest request);
}
